package northwind.repository;

import java.util.Collection;

import org.springframework.dao.DataAccessException;

import northwind.model.Category;
import northwind.model.Product;

public interface ProductRepository {

	/**
	 * Retrieve all <code>Category</code> from the data store
	 * 
	 * @return a <code>Collection</code> of <code>Category</code> s
	 * @throws DataAccessException
	 */
	Collection<Category> findAllCategory() throws DataAccessException;

	Category findCategoryById(int id) throws DataAccessException;

	int createCategory(final String name, final String description)
			throws DataAccessException;

	int updateCategory(final int id, final String newName,
			final String newDescription) throws DataAccessException;

	int deleteCategory(final int id) throws DataAccessException;

	//
	Collection<Product> findAllProduct() throws DataAccessException;

	Collection<Product> findAllProductByCategory(final int categoryID)
			throws DataAccessException;

}
